﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zhao.Common.Helper;
using Zhao.Models.DTO;
using Zhao.Models.Entity;

namespace Zhao.IServer.User
{
    /// <summary>
    /// 角色表（RBAC权限控制）
    ///</summary>
    public interface IRolesServer : IBaseService<Roles>
    {
        /// <summary>
        /// 获取所有的菜单信息
        /// 根据角色判断，菜单是否归属于某个角色
        /// </summary>
        /// <param name="roleId"></param>
        /// <returns></returns>
        public Task<(List<MenuDTO>, List<Guid>)> GetAllMenuTreeListAsync(int roleId);

        public ApiResult SetRoleMenus(int roleId, List<Guid> menuIds);
    }
}
